import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPublicMiniPlayer } from "./SPublicMiniPlayer";
import { EBattleResult } from "./EBattleResult";
type int = number;
//class SBattleResult
// did
export class SBattleResult extends IMessageBase {
  constructor(arg1: Boolean = false) {
    
    super();if (arg1) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SBattleResult();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    this.toPlayerInfo.__write(arg1);
    this.result.__write(arg1);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.toPlayerInfo = new SPublicMiniPlayer();
    this.toPlayerInfo.__read(arg1);
    this.result = EBattleResult.__read(arg1);
    return;
  }

  public /* const */ _type: int = 125;

  public /* var */ toPlayerInfo!: SPublicMiniPlayer;

  public /* var */ result!: EBattleResult;

  public static /* var */ _regist: SBattleResult;
}

SBattleResult._regist = new SBattleResult(true);
